<#assign entityName="${nameInfo.entityName?uncap_first}">
<#assign daoName="${nameInfo.daoName?uncap_first}">
package ${nameInfo.serviceImplPackage};

import java.util.List;
import ${nameInfo.entityPackage}.${nameInfo.entityName};
import ${nameInfo.servicePackage}.${nameInfo.serviceName};
import ${nameInfo.daoPackage}.${nameInfo.daoName};
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class ${nameInfo.serviceImplName} implements ${nameInfo.serviceName} {

	@Autowired
	private ${nameInfo.daoName} ${daoName};
	
	public ${nameInfo.serviceImplName}() {
	}
	
	public void set${nameInfo.daoName}(${nameInfo.daoName} ${daoName}){
		this.${daoName}=${daoName};
	}
	
	public ${nameInfo.daoName} get${nameInfo.daoName}(){
		return ${daoName};
	}
	
	@Override
	public void delete${nameInfo.entityName}(${nameInfo.entityName} ${entityName}) throws Exception {
		${daoName}.delete${nameInfo.entityName}(${entityName});
	}

	@Override
	public List<${nameInfo.entityName}> queryAll${nameInfo.entityName}() throws Exception {
		return ${daoName}.queryAll${nameInfo.entityName}(); 
	}

	@Override
	public ${nameInfo.entityName} query${nameInfo.entityName}ByKey(${nameInfo.entityName} ${entityName}) throws Exception {
		return ${daoName}.query${nameInfo.entityName}ByKey(${entityName});
	}

	@Override
	public void save${nameInfo.entityName}(${nameInfo.entityName} ${entityName}) throws Exception {
		${daoName}.save${nameInfo.entityName}(${entityName});
	}

	@Override
	public void update${nameInfo.entityName}(${nameInfo.entityName} ${entityName}) throws Exception {
		${daoName}.update${nameInfo.entityName}(${entityName});
	}	
}